how to get the contents of a txt file in python

81

get text from txt file python -

with open ("data.txt", "r") as myfile:
    data = myfile.read().splitlines()

Comments

Submit
0 Comments